#ifndef NNE_DEVICE_EZ_MASTER_H_
#define NNE_DEVICE_EZ_MASTER_H_
#include "type.h"
#include "util.h"
#include "device/conv_dma.h"
#include "device/conv_path.h"
#include "device/vector_path_v2.h"
#include <memory>

class EZMaster{
public:
  EZMaster(std::shared_ptr<ConvDMA> dma_obj,
           std::shared_ptr<VectorPath_v2> vector_obj,
           std::shared_ptr<ConvPath> conv_obj,
           std::shared_ptr<Sram> table_mem,
           std::shared_ptr<Sram> task_mem0,
           std::shared_ptr<Sram> task_mem1);
  u32 ezmst_en;
  bool hw_event_en;
  bool sw_event_cfg;
  u32 event_id;
  bool clear_id;
  bool irq_en;
  bool irq_clear;
  u32 raw_irq;
  u32 module_id;
  void Run();
private:
  std::shared_ptr<ConvDMA> DMAPtr;
  std::shared_ptr<VectorPath_v2> VectorPtr;
  std::shared_ptr<ConvPath> ConvPtr;
  std::shared_ptr<Sram> TableMemPtr;
  std::shared_ptr<Sram> TaskMemPtr[2];
};


#endif
